//登录接口
import request from '@/utils/request.js'

//登录
export function userlogin(data){
	return request({
		url: '/user/login',
		method: 'POST',
		data: data,
	})
}

//修改密码
export function updatePassword(data){
	return request({
		url: '/user/updatePassword',
		method: 'POST',
		data: data,
	})
}

//发送验证码国内
export function txSend(data){
	return request({
		url: '/hwNote/hwSend',
		method: 'POST',
		data: data,
	})
}

//ucloud发送国际短信
export function ucloudSendSms(data){
	return request({
		url: '/ucloud/ucloudSendSms',
		method: 'POST',
		data: data,
	})
}


//注册用户
export function register(data){
	return request({
		url: '/user/register',
		method: 'POST',
		data: data,
	})
}

//文件删除
export function deleteFile(data){
	return request({
		url: '/file-info/pub/deleteFile',
		method: 'get',
		data
	})
}

//查询用户信息
export function selectUser(data){
	return request({
		url: '/user/selectUser',
		method: 'get',
		data
	})
}

//查询系统协议
export function getSystemProtocol(data){
	return request({
		url: '/systemProtocol/getSystemProtocol',
		method: 'POST',
		data: data,
	})
}

//获取UserSig
export function getUserSig(data){
	return request({
		url: '/tencent/getUserSig',
		method: 'POST',
		data: data,
	})
}

//查询是否存账户
export function registerVerify(data){
	return request({
		url: '/user/registerVerify',
		method: 'POST',
		data: data,
	})
}

//查询系统参数对象
export function selectSystemParam(data){
	return request({
		url: '/system-param/selectSystemParam',
		method: 'GET',
		data: data,
	})
}

export function getApi(url, data){
	return request({
		url: url,
		method: 'GET',
		data
	})
}

export function postApi(url, data){
	return request({
		url: url,
		method: 'POST',
		data: data,
	})
}
